<?php
include("./include/config.inc.php");
$cfg_menuSelected[6] = 1;

if(isset($_POST['Submit']))
{
	$fName       = (isset($_POST['fName'])) ? $_POST['fName'] :"";
	$mName       = (isset($_POST['mName'])) ? $_POST['mName'] :"";
	$sName       = (isset($_POST['sName'])) ? $_POST['sName'] :"";
	$gender      = (isset($_POST['gender'])) ? $_POST['gender'] :"";
	$city        = (isset($_POST['city'])) ? $_POST['city'] :"";
	$address     = (isset($_POST['address'])) ? $_POST['address'] :"";
	$postalCode  = (isset($_POST['postalCode'])) ? $_POST['postalCode'] :"";
	$contactNo   = (isset($_POST['contactNo'])) ? $_POST['contactNo'] :"";
	$webSite     = (isset($_POST['webSite'])) ? $_POST['webSite'] :"";
	$email       = (isset($_POST['email'])) ? $_POST['email'] :"";
	$userName    = (isset($_POST['userName'])) ? $_POST['userName'] :"";
	$password    = (isset($_POST['password'])) ? $_POST['password'] :"";
	
	
	
echo  $insertRegister = "INSERT INTO register(fName,mName,sName,gender,city,address,postalCode,contactNo,webSite,email,userName,password)
                       VALUES('".$fName."','".$mName."','".$sName."','".$gender."','".$city."','".$address."','".$postalCode."',
                       '".$contactNo."','".$webSite."','".$email."','".$userName."','".$password."')";
  $insertRegisterRes = mysql_query($insertRegister);
  if(!$insertRegisterRes)
  {
  	echo "Fail";
  }
  else
  {
    header("Location:index.php");
  }
   
}
include("./bottom.php");
$smarty->display("register.tpl");
?>